package com.epam.rentcar.DAO;

import java.sql.SQLException;
import java.util.List;

import javax.naming.NamingException;

import com.epam.rentcar.transferobjects.CarRequest;

public interface CarRequestDAO {

	boolean addRequest(int userID, String name,
			String passport, int carID, int rentDuration) throws SQLException, NamingException;

	List<CarRequest> getAllCancelledRequests() throws SQLException, NamingException;
	
	List<CarRequest> getAllPayedCarRequests() throws SQLException, NamingException;
	
	List<CarRequest> getAllRequests() throws SQLException, NamingException;
	
	List<CarRequest> getAllUserNotPayedCarRequests(int userID) throws SQLException, NamingException;
	
	List<CarRequest> getAllNotPayedCarRequests() throws SQLException, NamingException;

	boolean cancellRequest(int requestID, String purpose) throws SQLException, NamingException;

	boolean approveRequest(int requestID) throws SQLException, NamingException;

	boolean deleteRequest(int requestID) throws SQLException, NamingException;
	
	boolean setPaymentPurpose(int requestID, String purpose) throws SQLException, NamingException;

	boolean payRequest(int requestID) throws SQLException, NamingException;
	
	boolean setRequestNotPayed(int requestID) throws SQLException, NamingException;
}
